package com.wanglianyun.redis;



import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;

/**
 * Description: Redis的config处理（不处理序列化则redis值会乱码）
 * Copyright: Copyright (c) 2024
 * Create Time: 2024-07-23 15:12
 *
 * @author wanglianyun
 */
@Configuration
public class RedissonConfig {

//    @Bean
//    public RedissonClient redissonClient() {
//        Config config = new Config();
//        //集群配置
////        config.useClusterServers()
////                .addNodeAddress("redis://127.0.0.1:1001")
////                .addNodeAddress("redis://127.0.0.1:1002")
////                .addNodeAddress("redis://127.0.0.1:1003")
//        //单节点,需要设置redis密码不然会报错
//        config.useSingleServer().
//                setAddress("redis://116.198.247.143:6379").
//                setDatabase(5).
//                setPassword("Admin@123@wly");
//
//        return Redisson.create(config);
//    }
}
